//  Kratos Multi-Physics - ThermalDEM Application
//
//  License:       BSD License
//                 Kratos default license: kratos/license.txt
//
//  Main authors:  Rafael Rangel (rrangel@cimne.upc.edu)
//

// System includes

// External includes
#include "includes/kratos_flags.h"
#include "containers/flags.h"
#include "geometries/sphere_3d_1.h"

// Project includes
#include "thermal_dem_application.h"

namespace Kratos
{
  KratosThermalDEMApplication::KratosThermalDEMApplication():KratosApplication("ThermalDEMApplication"),
    mThermalSphericParticle            (0, Element::GeometryType::Pointer(new Sphere3D1<Node> (Element::GeometryType::PointsArrayType(1)))),
    mThermalSphericContinuumParticle   (0, Element::GeometryType::Pointer(new Sphere3D1<Node >(Element::GeometryType::PointsArrayType(1)))),
    mSinteringSphericContinuumParticle (0, Element::GeometryType::Pointer(new Sphere3D1<Node >(Element::GeometryType::PointsArrayType(1))))
  {}

  void KratosThermalDEMApplication::Register()
  {
    std::cout << "Initializing KratosThermalDEMApplication... " << std::endl;

    // Register variables
    KRATOS_REGISTER_VARIABLE(DIRECT_CONDUCTION_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(INDIRECT_CONDUCTION_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(CONVECTION_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(RADIATION_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(GENERATION_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(REAL_CONTACT_MODEL_POINTER)
    KRATOS_REGISTER_VARIABLE(THERMAL_INTEGRATION_SCHEME_POINTER)
    KRATOS_REGISTER_VARIABLE(NUMERICAL_INTEGRATION_METHOD_POINTER)
    KRATOS_REGISTER_VARIABLE(DIRECT_CONDUCTION_MODEL_NAME)
    KRATOS_REGISTER_VARIABLE(INDIRECT_CONDUCTION_MODEL_NAME)
    KRATOS_REGISTER_VARIABLE(CONVECTION_MODEL_NAME)
    KRATOS_REGISTER_VARIABLE(RADIATION_MODEL_NAME)
    KRATOS_REGISTER_VARIABLE(REAL_CONTACT_MODEL_NAME)
    KRATOS_REGISTER_VARIABLE(THERMAL_INTEGRATION_SCHEME_NAME)
    KRATOS_REGISTER_VARIABLE(NUMERICAL_INTEGRATION_METHOD_NAME)
    KRATOS_REGISTER_VARIABLE(VORONOI_METHOD_NAME)
    KRATOS_REGISTER_VARIABLE(POROSITY_METHOD_NAME)
    KRATOS_REGISTER_VARIABLE(AUTO_SOLVE_FREQUENCY_OPTION)
    KRATOS_REGISTER_VARIABLE(COMPUTE_FORCES_OPTION)
    KRATOS_REGISTER_VARIABLE(COMPUTE_MOTION_OPTION)
    KRATOS_REGISTER_VARIABLE(DIRECT_CONDUCTION_OPTION)
    KRATOS_REGISTER_VARIABLE(INDIRECT_CONDUCTION_OPTION)
    KRATOS_REGISTER_VARIABLE(CONVECTION_OPTION)
    KRATOS_REGISTER_VARIABLE(RADIATION_OPTION)
    KRATOS_REGISTER_VARIABLE(HEAT_GENERATION_OPTION)
    KRATOS_REGISTER_VARIABLE(GENERATION_SLIDING_OPTION)
    KRATOS_REGISTER_VARIABLE(GENERATION_ROLLING_OPTION)
    KRATOS_REGISTER_VARIABLE(GENERATION_DAMPING_OPTION)
    KRATOS_REGISTER_VARIABLE(HEAT_MAP_GENERATION_OPTION)
    KRATOS_REGISTER_VARIABLE(REAL_CONTACT_OPTION)
    KRATOS_REGISTER_VARIABLE(FIXED_TEMPERATURE)
    KRATOS_REGISTER_VARIABLE(ADIABATIC)
    KRATOS_REGISTER_VARIABLE(THERMAL_FREQUENCY)
    KRATOS_REGISTER_VARIABLE(HEATFLUX)
    KRATOS_REGISTER_VARIABLE(THERMAL_CONDUCTIVITY)
    KRATOS_REGISTER_VARIABLE(REAL_YOUNG_MODULUS_RATIO)
    KRATOS_REGISTER_VARIABLE(HEATSOURCE)
    KRATOS_REGISTER_VARIABLE(MIN_CONDUCTION_DISTANCE)
    KRATOS_REGISTER_VARIABLE(MAX_CONDUCTION_DISTANCE)
    KRATOS_REGISTER_VARIABLE(CONDUCTION_RADIUS)
    KRATOS_REGISTER_VARIABLE(ISOTHERMAL_CORE_RADIUS)
    KRATOS_REGISTER_VARIABLE(MAX_RADIATION_DISTANCE)
    KRATOS_REGISTER_VARIABLE(HEAT_GENERATION_RATIO)
    KRATOS_REGISTER_VARIABLE(AVERAGE_POROSITY)
    KRATOS_REGISTER_VARIABLE(ALPHA_SHAPE_PARAMETER)
    KRATOS_REGISTER_VARIABLE(INTEGRAL_TOLERANCE)
    KRATOS_REGISTER_VARIABLE(FLUID_LAYER_THICKNESS)
    KRATOS_REGISTER_VARIABLE(FLUID_DENSITY)
    KRATOS_REGISTER_VARIABLE(FLUID_VISCOSITY)
    KRATOS_REGISTER_VARIABLE(FLUID_THERMAL_CONDUCTIVITY)
    KRATOS_REGISTER_VARIABLE(FLUID_HEAT_CAPACITY)
    KRATOS_REGISTER_VARIABLE(FLUID_TEMPERATURE)
    KRATOS_REGISTER_VARIABLE(FLUID_VELOCITY)
    KRATOS_REGISTER_VARIABLE(HEAT_MAP_COORDINATES_1)
    KRATOS_REGISTER_VARIABLE(HEAT_MAP_COORDINATES_2)
    KRATOS_REGISTER_VARIABLE(HEAT_MAP_SUBDIVISIONS)

    // Register elements
    KRATOS_REGISTER_ELEMENT("ThermalSphericParticle",            mThermalSphericParticle)
    KRATOS_REGISTER_ELEMENT("ThermalSphericContinuumParticle",   mThermalSphericContinuumParticle)
    KRATOS_REGISTER_ELEMENT("SinteringSphericContinuumParticle", mSinteringSphericContinuumParticle)
  }
} // namespace Kratos
